package tw.com.softleader.spring.service.impl;

import java.util.List;

import javax.annotation.PostConstruct;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tw.com.softleader.spring.dao.MovieDao;
import tw.com.softleader.spring.entity.Movie;
import tw.com.softleader.spring.service.MovieService;

@Service
public class MoiveServiceImpl implements MovieService{
	private Logger log = LoggerFactory.getLogger(this.getClass());
	
	@PostConstruct
	public void initToRun(){
		log.debug("InitToRun for MoiveServiceImpl");
	}

	@Autowired
	private MovieDao dao;
	
	public List<Movie> getAll(){
		log.debug("InitToRun for MoiveServiceImpl");
		return dao.findAll();
	} 
}
